# 导包
import requests
import unittest
# 创建封包接口类
import app


class Register_Unittest:
    # 初始化类属性
    def __init__(self):# 初始化接口属性
        self.it_hei_ma_url= app.BASE_URL+"/api/sys/login"  # 定义登录的url(从全局变量中提取根url,拼接资源路径)
    def login(self,jsonData):
        self.respones = requests.post(url=self.it_hei_ma_url,
                                headers = app.HEADERS,
                                json = jsonData)
        return self.respones

if __name__ == '__main__':
    re = Register_Unittest()
    num = re.login({"mobile":"13800000001","password":"123456"})
    print(num.json())